home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 November
/
PCWorld_2006-11_cd.bin
/
domacnost a kancelar
/
easytime
/
ETT.exe
/
reports
/
xslt
/
SummaryTimesheetGroupByDay.xsl
< prev
next >
Wrap
Extensible Markup Language
|
2006-08-18
|
3KB
|
88 lines
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<xsl:apply-templates select="/Report/HeaderInfo"></xsl:apply-templates>
<xsl:apply-templates select="/Report/Customer"></xsl:apply-templates>
<xsl:apply-templates select="/Report/Total" />
</body>
</html>
</xsl:template>
<!-- Верхний заголовок -->
<xsl:template match="HeaderInfo">
<table class="TableSB" align="center" width="70%">
<tr>
<td class="TableSB">
<table class="TableSB" width="100%" cellpadding="2" cellspacing="0" >
<tr>
<td colspan="2" align="center" class="ReportTitleClass"><xsl:value-of select="/Report/@Type"/></td>
</tr>
<xsl:if test="Date"> <!--Если явно выбран диапазон дат -->
<tr>
<td colspan="2" align="right" class="Date"><xsl:value-of select="Date/From"/> - <xsl:value-of select="Date/To"/></td>
</tr>
</xsl:if>
</table>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match="Customer">
<table align="center" width="70%">
<tr>
<td class="CompanyName"><xsl:value-of select="@Name"/></td>
</tr>
<xsl:for-each select="Project">
<!-- <xsl:if test="SubTotal != "0:00""> -->
<table align="center" width="70%">
<tr>
<td valign="top" class="ProjectName" colspan="2"><xsl:value-of select="@Name" /> </td>
</tr>
<xsl:for-each select="Date">
<tr>
<td width="85%" valign="top" class="DetailRowDataClass"><xsl:value-of select="@Value"/></td>
<td width="15%" valign="top" class="DetailRowDataClass1"><xsl:value-of select="Hours"/></td>
</tr>
</xsl:for-each>
<tr>
<td width="85%" valign="top" class="SubTotal">Sub-total:</td>
<td width="15%" valign="top" class="DetailRowDataClass1"><xsl:value-of select="SubTotal"/></td>
</tr>
<!-- </xsl:if> -->
</table>
</xsl:for-each>
</table>
</xsl:template>
<xsl:template match="Companies/Company">
<xsl:value-of select="text()"/>
<xsl:if test="following-sibling::*/text()">, </xsl:if>
</xsl:template>
<xsl:template match="Projects/Project">
<xsl:value-of select="text()"/>
<xsl:if test="following-sibling::*/text()">, </xsl:if>
</xsl:template>
<xsl:template match="Tasks/Task">
<xsl:value-of select="text()"/>
<xsl:if test="following-sibling::*/text()">, </xsl:if>
</xsl:template>
<xsl:template match="/Report/Total">
<table width="70%" align="center">
<tr>
<td width="85%" class="Total">Total:</td>
<td class="Total"><xsl:value-of select="text()" /></td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>